<?php

    require_once '../config.php';
    require_once '../Includes/functions.php';
    require_once '../Libs/uploader.class.php';
    
    require_once ABSPATH.'admin/admin-twig-loader.php';
    
    require_once ABSPATH. 'Libs/eZ/shared/ez_sql_core.php';
    require_once ABSPATH.'Libs/eZ/ez_sql_mysql.php';
    
    
    
    // Initialise singleton
   $dbp = new ezSQL_mysql(DB_USER, DB_PASSWORD, DB_NAME, DB_HOST);
   // SET DB
   $dbp->query("SET NAMES utf8");

   // Check user authentication
   check_login();
   
   if (current_user()) {
       $user = current_user();
       
       $twig->addGlobal('username', $user->username);
   }
?>
